this is BE implementation:
import { env } from './env.config';
export const SuperTokensConfig: TypeInput = {
framework: 'express',
supertokens: {
// this is the location of the SuperTokens core.
connectionURI: env.supertokens.connectionUri,
apiKey: env.supertokens.apiKey,
},
appInfo: {
appName: 'Test',
apiDomain: env.supertokens.apiDomain,
websiteDomain: env.supertokens.websiteDomain,
apiBasePath: '/v1/auth',
websiteBasePath: '/auth',
},
recipeList: [
ThirdPartyPasswordless.init({
providers: [
ThirdPartyPasswordless.Google({
clientId: env.google.clientId,
clientSecret: env.google.clientSecret,
scope: [
'https://www.googleapis.com/auth/user.birthday.read',
'https://www.googleapis.com/auth/user.gender.read',
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/userinfo.email',
],
}),
customFacebook({
clientId: env.facebook.clientId,
clientSecret: env.facebook.clientSecret,
scope: ['user_birthday', 'user_gender'],
}),
customKakao(env.kakao),
],
contactMethod: 'EMAIL_OR_PHONE',
flowType: 'USER_INPUT_CODE_AND_MAGIC_LINK',
}),
Session.init({
cookieSecure: true,
}),
Dashboard.init(),
UserMetadata.init(),
],
};